<?php
require 'Photo.php';
$photo = new Photo();
$flag = $_GET["flag"];
if ($flag == "photoList")
{
	$type = $_GET["type"];
	$start = $_GET["start"];
	$arr = $photo->getPhotoListByType($type, $start);
	print_r(json_encode($arr));
}
else if ($flag == "photoType")
{
	$arr = $photo->getPhotoTypeList();
	print_r(json_encode($arr));
}
else if ($flag == "photoCount")
{
	$type = $_GET["type"];
	$count = $photo->getPhotoCount($type);
	print_r($count);
}
else if ($flag == "titleList")
{
	$arr = $photo->getTitleList();
	print_r(json_encode($arr));
}
else if ($flag == "teaCount")
{
	$count = $photo->getTeaCount();
	print_r($count);
}
else if ($flag == "wineCount")
{
	$count = $photo->getWineCount();
	print_r($count);
}
else if ($flag == "foodCount")
{
	$count = $photo->getFoodCount();
	print_r($count);
}
else if ($flag == "brandCount")
{
	$count = $photo->getBrandCount();
	print_r($count);
}
else if ($flag == "office")
{
	$start = $_GET["start"];
	$arr = $photo->getOfficeList($start);
	print_r(json_encode($arr));
}
else if ($flag == "officeCount")
{
	$count = $photo->getOfficeCount();
	print_r($count);
}
else if ($flag == "brandList")
{
	$id = $_GET["id"];
	$arr = $photo->getBrandListById($id);
	print_r(json_encode($arr));
}
?>